package exp5;



import java.util.Scanner;

public class MyBCTester  {

  public static void main (String[] args) {

    String expression, again;
    String ans;
    double result;

     try
     {
       Scanner in = new Scanner(System.in);

       do
       {
         MyBC evaluator = new MyBC();
         System.out.println ("Enter a expression: ");
         expression = in.nextLine();
         
         result = evaluator.GetResult(expression);
         ans = evaluator.ExpressionOut(expression);
         System.out.println();
         System.out.println ("That expression equals " + result);
         System.out.println();
         System.out.println ("That expression  " + ans);
         System.out.print ("Evaluate another expression [Y/N]? ");
         again = in.nextLine();
         System.out.println();
       }
       while (again.equalsIgnoreCase("y"));
     }
     catch (Exception IOException)
     {
       System.out.println("Input exception reported");
     }
   }
 }
